<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="blog-list-fragment" class="am-u-lg-8 am-u-sm-12">
    <main class="articles-list">
        <div>
            <th:block th:if="${null != blogPageResult}">
                <th:block th:each="blog,iterStat : ${blogPageResult.list}">

                    <article class="am-g blog-entry-article">
                        <div class="am-u-lg-6 am-u-lg-12 am-u-sm-12 blog-entry-text post-preview">
                            <div class="topic-header">
                                <div class="pull-left">

                                    <div class="blog-flex-center">

                                        <div class="blog-flex0">
                                            <img th:src="@{${configurations.get('yourAvatar')}}" alt=""
                                                 class="link avatar avatar-image">
                                        </div>

                                        <div class="author-lockup blog-flex1">
                                            <a class="link" href="javascript:;"
                                               th:text="${configurations.get('yourName')}">
                                            </a>
                                            <!--                                            <span class="in">in</span>-->
                                            <span class="in">标签:</span>
                                            <span class="category-name">
                                                <a class="category-name" rel="tag"
                                                   th:href="@{'/category/' + ${blog.blogCategoryName}}"
                                                   th:utext="${blog.blogCategoryName}">
                                                </a>
                                            </span>
                                        </div>

                                    </div>

                                </div>
                            </div>

                            <h1 class="post-index-title">
                                <a itemtype="url" th:href="@{'/blog/' + ${blog.blogId}}">
                                    <th:block th:text="${blog.blogTitle}"></th:block>
                                </a>
                            </h1>

                            <div class="post-content-preview article-body">
                                <a th:href="@{'/blog/' + ${blog.blogId}}">
                                    <img th:src="@{${blog.blogCoverImage}}" alt="">
                                </a>
                            </div>

                            <!--PC端-->
                            <div class="clearfix topic-footer">
                                <span class="pull-left time pc_time">
                                    <img th:src="@{/blog/amaze/images/time.png}" style="width: 14px;height: 14px;"/>
                                </span>
                                <span class="pull-left time pc_time"
                                      th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}">2022-1-19
                                </span>
                            </div>

                            <!--手机端-->
                            <div class="clearfix topic-footer">
                                <span class="pull-left time mobile_time">
                                    <img th:src="@{/blog/amaze/images/time.png}" style="width: 15px;height: 15px;"/>
                                </span>
                                <span class="pull-left time mobile_time"
                                      th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}">2022-1-19
                                </span>
                            </div>
                        </div>
                    </article>
                </th:block>
            </th:block>

            <!--            <th:block th:if="${null != blogPageResult}">-->
            <!--            <th:block th:if="false">-->
            <th:block th:if="${null != blogPageResult}">
                <ul class="am-pagination" style="text-align: center">
                    <li th:class="${blogPageResult.currPage==1}?'disabled' : 'am-pagination-prev'"><a
                            th:href="@{${blogPageResult.currPage==1}?'##':'/page/' + ${blogPageResult.currPage-1}}">&laquo;</a>
                    </li>
                    <li th:if="${blogPageResult.currPage-3 >=1}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage-3}}"
                            th:text="${blogPageResult.currPage -3}">1</a></li>
                    <li th:if="${blogPageResult.currPage-2 >=1}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage-2}}"
                            th:text="${blogPageResult.currPage -2}">1</a></li>
                    <li th:if="${blogPageResult.currPage-1 >=1}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage-1}}"
                            th:text="${blogPageResult.currPage -1}">1</a></li>
                    <li class="active"><a href="#" th:text="${blogPageResult.currPage}">1</a></li>
                    <li th:if="${blogPageResult.currPage+1 <=blogPageResult.totalPage}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage+1}}"
                            th:text="${blogPageResult.currPage +1}">1</a></li>
                    <li th:if="${blogPageResult.currPage+2 <=blogPageResult.totalPage}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage+2}}"
                            th:text="${blogPageResult.currPage +2}">1</a></li>
                    <li th:if="${blogPageResult.currPage+3 <=blogPageResult.totalPage}"><a
                            th:href="@{'/page/' + ${blogPageResult.currPage+3}}"
                            th:text="${blogPageResult.currPage +3}">1</a></li>
                    <li th:class="${blogPageResult.currPage==blogPageResult.totalPage}?'disabled' : ''">
                        <a
                                th:href="@{${blogPageResult.currPage==blogPageResult.totalPage}?'##' : '/page/' + ${blogPageResult.currPage+1}}">&raquo;</a>
                    </li>
                </ul>
            </th:block>
            <hr>
            <div id="a2" onclick="englishMethod()" style="text-align: center">
                <h2>
                    <script>en()</script>
                </h2>
            </div>
            <hr>
        </div>
    </main>
</div>

<!--烟花特效资源-->
<script th:src="@{/blog/default/js/yhtx.js}"></script>
</html>
